package com.ruoyi.common.mybatisplus;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import org.apache.ibatis.type.BaseTypeHandler;

public abstract class DefaultEnumTypeHandler implements ConfigurationCustomizer {
    @Override
    public void customize(MybatisConfiguration configuration) {
        configuration.setDefaultEnumTypeHandler(getDefaultEnumTypeHandler());
    }

    protected abstract Class<? extends BaseTypeHandler> getDefaultEnumTypeHandler();
}
